import { DownOutlined, FullscreenOutlined } from '@ant-design/icons';
import { Dropdown, Space } from 'antd';
import { FC } from 'react';
import login from "../img/微信图片_20230204134931.jpg";
import "../left/Left.css";
import Breadcrumbbb from "./Breadcrumb"; //面包屑

const items = [
  {
    label: <a href="#">个人资料修改</a>,
    key: '0',
  },
  {
    label: <a href="/Login">退出登录</a>,
    key: '1'
  }
];

interface IProps {
  matches: any []
}
const Head:FC<IProps> = ({matches}) => { //matches是Home组件传过来的
  let name = sessionStorage.getItem('login') //登录名

  return (
    <>
      <div className='top'>

        <div className='hjfjfj'>
          <img className='imglfip' src={login} alt="乐宁教育" />
          {/* 面包屑 */}
          <Breadcrumbbb matches={matches}></Breadcrumbbb>
        </div>

        <div className='name'>

          <span className='icon'>
            {/* <FullscreenOutlined className='icon2' /> */}
          </span>

          {name}

          <Dropdown
            menu={{
              items,
            }}
            trigger={['click']}
          >

            <a onClick={(e) => e.preventDefault()}>
              <Space>
                <DownOutlined />
              </Space>
            </a>

          </Dropdown>

        </div>
      </div>
    </>
  );
}

export default Head;